package com.fairytask.engine.define
{
	import de.polygonal.ds.HashMap;
	
	public class UIDefine
	{
		public static const GetPetsUI		:int = 1;	//猎宠		
		public static const UniverseUI	:int = 2;	//升星
		public static const ProfileUI		:int = 3;	//装备栏
		public static const MainUI		:int = 4;	//mianUI背包等的主界面面板
		public static const MainSkillUI	:int = 5;	//升级技能和猎取命格的外框
		public static const PetsUI		:int = 6;	//升级宠物面板
		public static const PackageUI		:int = 7;   //背包面板
		public static const LineupUI		:int = 8;  	//阵型面板
		public static const SkillUI		:int = 9;	//技能面板
		public static const ArenaUI		:int = 10;	//竞技场挑战的面板
		public static const MillionStupaUI:int = 11; //万灵塔的面板
		public static const FunBtnUI		:int = 12;	//主界面的功能菜单
		public static const TopUI			:int = 13;  //顶部功能图标
		public static const HeadUI		:int = 14;  //顶部人物的显示
		public static const MainMapUI		:int = 15;  //主界面上的世界地图
		public static const TaskTraceUI	:int = 16;  //任务的追踪面板
		public static const WildBattleUI	:int = 17;  //野外战斗场景
		public static const WantedListUI	:int = 18;  //通缉榜的界面
		public static const ChartUI		:int = 19;  //命格的界面
		public static const WorldMapUI	:int = 20;  //世界地图ui
		public static const NpcTalkUI		:int = 21;	//npc的对话框
		public static const AlchemyUT  	:int = 22; 	//炼金炉
		public static const PanelUI       :int = 23;  //面板 closeBtn
		public static const OfflineBattleUI:int	=	24; //挂机的界面
		public static const AreaResultUI	:int	=	25;	//抽奖的界面
		public static const TaskUI        :int   = 26;  //任务界面
		
		public static const PetsProfileUI	:int = 27;	//宠物属性
		public static const PetsListUI	:int = 28;	//宠物列表
		public static const PetsFuseUI	:int = 29;	//宠物融合
		public static const PetsSwallowUI	:int = 30;	//宠物吞噬
		public static const RoleListUI	:int = 31;	//人物及宠物头像
		public static const RecastUI		:int = 32;	//洗练		
		public static const RefineUI		:int = 33;	//精炼
		public static const SkillProfileUI	:int = 34;	//装备及属性（命格/技能）
		public static const PetEquipUI	:int = 35;	//宠物装备及属性
		
		private static var UITable		:HashMap	=	new HashMap();
		
		private static var isInit	:Boolean	=	false;
		
		public function UIDefine()
		{
		}
		
		/**
		 * 初始化UI数据表 
		 */
		private static function initTable():void
		{
			UITable.set(GetPetsUI,"com.fairytask.ui.GetPetsUI");
			UITable.set(UniverseUI,"com.fairytask.ui.mainUnit.UniverseUI");
			UITable.set(ProfileUI,"com.fairytask.ui.mainUnit.ProfileUI");
			UITable.set(MainUI,"com.fairytask.ui.MainUI");
			UITable.set(MainSkillUI,"com.fairytask.ui.MainSkillUI");
			UITable.set(PetsUI,"com.fairytask.ui.PetsUI");
			UITable.set(PackageUI,"com.fairytask.ui.pack.PackageUI");
			UITable.set(SkillUI,"com.fairytask.ui.skillUnit.SkillUI");
			UITable.set(LineupUI,"com.fairytask.ui.mainUnit.LineupUI");
			UITable.set(ArenaUI,"com.fairytask.ui.ArenaUI");
			UITable.set(MillionStupaUI,"com.fairytask.ui.MillionStupaUI");
			UITable.set(FunBtnUI,"com.fairytask.ui.main.FunBtnUI");
			UITable.set(TopUI,"com.fairytask.ui.main.TopUI");
			UITable.set(HeadUI,"com.fairytask.ui.main.HeadUI");
			UITable.set(MainMapUI,"com.fairytask.ui.main.MainMapUI");
			UITable.set(TaskTraceUI,"com.fairytask.ui.TaskTraceUI");
			UITable.set(WildBattleUI,"com.fairytask.ui.WildBattleUI");
			UITable.set(WantedListUI,"com.fairytask.ui.WantedListUI");
			UITable.set(ChartUI,"com.fairytask.ui.skillUnit.ChartUI");
			UITable.set(WorldMapUI,"com.fairytask.ui.WorldMapUI");
			UITable.set(NpcTalkUI,"com.fairytask.ui.NpcTalkUI");
			UITable.set(AlchemyUT,"com.fairytask.ui.AlchemyUT");
			UITable.set(PanelUI,"com.fairytask.ui.PanelUI");
			UITable.set(OfflineBattleUI,"com.fairytask.ui.OfflineBattleUI");
			UITable.set(AreaResultUI,"com.fairytask.ui.AreaResultUI");
			UITable.set(TaskUI,"com.fairytask.ui.TaskUI");
			
			UITable.set(PetsProfileUI,"com.fairytask.ui.petsUnit.PetsProfileUI");
			UITable.set(PetsListUI,"com.fairytask.ui.petsUnit.PetsListUI");
			UITable.set(PetsFuseUI,"com.fairytask.ui.petsUnit.PetsFuseUI");
			UITable.set(PetsSwallowUI,"com.fairytask.ui.petsUnit.PetsSwallowUI");
			UITable.set(RoleListUI,"com.fairytask.ui.mainUnit.RoleListUI");
			UITable.set(RecastUI,"com.fairytask.ui.mainUnit.RecastUI");
			UITable.set(RefineUI,"com.fairytask.ui.mainUnit.RefineUI");
			UITable.set(SkillProfileUI,"com.fairytask.ui.skillUnit.SkillProfileUI");
			UITable.set(PetEquipUI,"com.fairytask.ui.petsUnit.PetEquipUI");
			
			isInit	=	true;
		}
		
		/**
		 * 根据ID来取得定义 
		 * @param pId
		 * @return 
		 * 
		 */
		public static function getUIById(pId:int):String
		{
			if(!isInit)
			{
				initTable();
			}
			return String(UITable.get(pId));
		}
	}
}